\(\int \frac {(a+b x)^2}{x \sqrt {c x^2}} \, dx\) [832]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 20, antiderivative size = 47 \[ \int \frac {(a+b x)^2}{x \sqrt {c x^2}} \, dx=-\frac {a^2}{\sqrt {c x^2}}+\frac {b^2 x^2}{\sqrt {c x^2}}+\frac {2 a b x \log (x)}{\sqrt {c x^2}} \]

[Out]

-a^2/(c*x^2)^(1/2)+b^2*x^2/(c*x^2)^(1/2)+2*a*b*x*ln(x)/(c*x^2)^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {15, 45} \[ \int \frac {(a+b x)^2}{x \sqrt {c x^2}} \, dx=-\frac {a^2}{\sqrt {c x^2}}+\frac {2 a b x \log (x)}{\sqrt {c x^2}}+\frac {b^2 x^2}{\sqrt {c x^2}} \]

[In]

Int[(a + b*x)^2/(x*Sqrt[c*x^2]),x]

[Out]

-(a^2/Sqrt[c*x^2]) + (b^2*x^2)/Sqrt[c*x^2] + (2*a*b*x*Log[x])/Sqrt[c*x^2]

Rule 15

Int[(u_.)*((a_.)*(x_)^(n_))^(m_), x_Symbol] :> Dist[a^IntPart[m]*((a*x^n)^FracPart[m]/x^(n*FracPart[m])), Int[
u*x^(m*n), x], x] /; FreeQ[{a, m, n}, x] &&  !IntegerQ[m]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps \begin{align*} \text {integral}& = \frac {x \int \frac {(a+b x)^2}{x^2} \, dx}{\sqrt {c x^2}} \\ & = \frac {x \int \left (b^2+\frac {a^2}{x^2}+\frac {2 a b}{x}\right ) \, dx}{\sqrt {c x^2}} \\ & = -\frac {a^2}{\sqrt {c x^2}}+\frac {b^2 x^2}{\sqrt {c x^2}}+\frac {2 a b x \log (x)}{\sqrt {c x^2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.77 \[ \int \frac {(a+b x)^2}{x \sqrt {c x^2}} \, dx=\frac {c \left (-a^2 x^2+b^2 x^4+2 a b x^3 \log (x)\right )}{\left (c x^2\right )^{3/2}} \]

[In]

Integrate[(a + b*x)^2/(x*Sqrt[c*x^2]),x]

[Out]

(c*(-(a^2*x^2) + b^2*x^4 + 2*a*b*x^3*Log[x]))/(c*x^2)^(3/2)

Maple [A] (verified)

Time = 0.36 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.62

method result size
default \(\frac {2 a b \ln \left (x \right ) x +b^{2} x^{2}-a^{2}}{\sqrt {c \,x^{2}}}\) \(29\)
risch \(-\frac {a^{2}}{\sqrt {c \,x^{2}}}+\frac {b^{2} x^{2}}{\sqrt {c \,x^{2}}}+\frac {2 a b x \ln \left (x \right )}{\sqrt {c \,x^{2}}}\) \(42\)

[In]

int((b*x+a)^2/x/(c*x^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

(2*a*b*ln(x)*x+b^2*x^2-a^2)/(c*x^2)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.72 \[ \int \frac {(a+b x)^2}{x \sqrt {c x^2}} \, dx=\frac {{\left (b^{2} x^{2} + 2 \, a b x \log \left (x\right ) - a^{2}\right )} \sqrt {c x^{2}}}{c x^{2}} \]

[In]

integrate((b*x+a)^2/x/(c*x^2)^(1/2),x, algorithm="fricas")

[Out]

(b^2*x^2 + 2*a*b*x*log(x) - a^2)*sqrt(c*x^2)/(c*x^2)

Sympy [A] (verification not implemented)

Time = 1.57 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.04 \[ \int \frac {(a+b x)^2}{x \sqrt {c x^2}} \, dx=- \frac {a^{2}}{\sqrt {c x^{2}}} + \frac {2 a b x \log {\left (x \right )}}{\sqrt {c x^{2}}} - b^{2} \left (\begin {cases} \tilde {\infty } x^{2} & \text {for}\: c = 0 \\- \frac {\sqrt {c x^{2}}}{c} & \text {otherwise} \end {cases}\right ) \]

[In]

integrate((b*x+a)**2/x/(c*x**2)**(1/2),x)

[Out]

-a**2/sqrt(c*x**2) + 2*a*b*x*log(x)/sqrt(c*x**2) - b**2*Piecewise((zoo*x**2, Eq(c, 0)), (-sqrt(c*x**2)/c, True
))

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.74 \[ \int \frac {(a+b x)^2}{x \sqrt {c x^2}} \, dx=\frac {2 \, a b \log \left (x\right )}{\sqrt {c}} + \frac {\sqrt {c x^{2}} b^{2}}{c} - \frac {a^{2}}{\sqrt {c} x} \]

[In]

integrate((b*x+a)^2/x/(c*x^2)^(1/2),x, algorithm="maxima")

[Out]

2*a*b*log(x)/sqrt(c) + sqrt(c*x^2)*b^2/c - a^2/(sqrt(c)*x)

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.89 \[ \int \frac {(a+b x)^2}{x \sqrt {c x^2}} \, dx=\frac {b^{2} x}{\sqrt {c} \mathrm {sgn}\left (x\right )} + \frac {2 \, a b \log \left ({\left | x \right |}\right )}{\sqrt {c} \mathrm {sgn}\left (x\right )} - \frac {a^{2}}{\sqrt {c} x \mathrm {sgn}\left (x\right )} \]

[In]

integrate((b*x+a)^2/x/(c*x^2)^(1/2),x, algorithm="giac")

[Out]

b^2*x/(sqrt(c)*sgn(x)) + 2*a*b*log(abs(x))/(sqrt(c)*sgn(x)) - a^2/(sqrt(c)*x*sgn(x))

Mupad [F(-1)]

Timed out. \[ \int \frac {(a+b x)^2}{x \sqrt {c x^2}} \, dx=\int \frac {{\left (a+b\,x\right )}^2}{x\,\sqrt {c\,x^2}} \,d x \]

[In]

int((a + b*x)^2/(x*(c*x^2)^(1/2)),x)

[Out]

int((a + b*x)^2/(x*(c*x^2)^(1/2)), x)